package com.empire.module.spider.convert.footballmatch;

import com.empire.framework.common.util.collection.CollectionUtils;
import com.empire.module.spider.api.dto.FootballMatchSportteryDTO;
import com.empire.module.spider.dal.dataobject.lotteryfootballmatchsporttery.LotteryFootballMatchSportteryDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface FootballMatchSportteryConvert {

    FootballMatchSportteryConvert INSTANCE = Mappers.getMapper(FootballMatchSportteryConvert.class);


    FootballMatchSportteryDTO convert(LotteryFootballMatchSportteryDO footballMatchDO);

    default List<FootballMatchSportteryDTO> convertList(List<LotteryFootballMatchSportteryDO> list) {
        return CollectionUtils.convertList(list, this::convert);
    }

}
